package com.naiterui.ehp.bs.doctor.domain;

import com.naiterui.ehp.bp.domain.Doctor;

/**
 * 医生标签
 * @author Amber
 * @since 1.0.0
 */
public class DoctorLabel {

	 // 医生标签--普通医生
    public static final int DOCTOR_LABLE_NOMAL = 0;
    // 医生标签--种子医生
    public static final int DOCTOR_LABLE_SEED = 1 << 0;
    // 医生标签--乡村医生
    public static final int DOCTOR_LABEL_COUNTRY = 1 << 1;
    // 医生标签--阳光化医生
    public static final int DOCTOR_LABEL_PUBLIC = 1 << 2;
    // 医生标签--正大天晴医生
    public static final int DOCTOR_LABEL_CTTQ = 1 << 3;
    // 安全用药范围医生标签
    public static final int DOCTOR_LABEL_RECOM_SAFE = 1 << 4;
    // 医生标签--辉瑞医生
    public static final int DOCTOR_LABEL_PFIZER = 1 << 5;
    // 医生标签--用药提醒灰度范围
    public static final int DOCTOR_LABEL_MEDICINE_REMIND = 1 << 6;
    //医生标签--灰度强制ICD10诊断
    public static final int DOCTOR_LABEL_DIAGNOSIS = 1<<7;
    // 医生标签--诊所医生
    public static final int DOCTOR_LABEL_CLINIC = 1 << 15;
    // 医生标签--灰度下级患者输入身份证号医生
    public static final int DOCTOR_LABEL_FORCE_PT_IDNO = 1 << 16;
    // 医生标识--医嘱处方医生
    public static final int DOCTOR_LABEL_RECORD_RECOM = 1 << 17;
    // 医生标识--辉瑞男科--为张志超及相关男科医生建立
    public static final int DOCTOR_LABEL_PFIZER_NEW = 1 << 18;

    /**
     * 医生所有标签
     * @param labels
     */
    public DoctorLabel(int labels) {
        totalLabels = labels;
    }

    /**
     * 全部标签：<code>totalLabels</code>
     */
    private Integer totalLabels = 0;

    /**
     * 是否用药提醒-灰度
     * DoctorLabel.getMedicineRemind()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getMedicineRemind() {
        return (totalLabels & Doctor.DOCTOR_LABEL_MEDICINE_REMIND) == Doctor.DOCTOR_LABEL_MEDICINE_REMIND;
    }

    /**
     * 是否种子医生
     * DoctorLabel.getSeed()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getSeed() {
        return (totalLabels & Doctor.DOCTOR_LABLE_SEED) == Doctor.DOCTOR_LABLE_SEED;
    }

    /**
     * 是否阳光化(原public)
     * DoctorLabel.getLegal()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getKeepRule() {
        return (totalLabels & Doctor.DOCTOR_LABEL_PUBLIC) == Doctor.DOCTOR_LABEL_PUBLIC;
    }

    /**
     * 是否正大天晴
     * DoctorLabel.getCttq()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getCttq() {
        return (totalLabels & Doctor.DOCTOR_LABEL_CTTQ) == Doctor.DOCTOR_LABEL_CTTQ;
    }

    /**
     * 是否辉瑞
     * DoctorLabel.getPfizer()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getPfizer() {
        return (totalLabels & Doctor.DOCTOR_LABEL_PFIZER) == Doctor.DOCTOR_LABEL_PFIZER;
    }

    /**
     * 是否诊所自定价
     * DoctorLabel.getClinic()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getClinic() {
        return (totalLabels & Doctor.DOCTOR_LABEL_CLINIC) == Doctor.DOCTOR_LABEL_CLINIC;
    }

    /**
     * 是否强制患者购药身份证号-灰度
     * DoctorLabel.getPtIdCard()
     * @Author Amber
     * @Date 2018年1月16日
     * @since 1.0.0
     * @return
     */
    public Boolean getPtIdCard() {
        return (totalLabels & Doctor.DOCTOR_LABEL_FORCE_PT_IDNO) == Doctor.DOCTOR_LABEL_FORCE_PT_IDNO;
    }

    /**
     * 是否医嘱处方范围医生-灰度
     * @author zhoupeipei
     * @return 3.2.0
     */
    public Boolean getRecordRecom() {
    	return (totalLabels & DOCTOR_LABEL_RECORD_RECOM) == DOCTOR_LABEL_RECORD_RECOM;
    }
    /**
     * 是否强制安全校验处方医生-灰度
     * @author zhoupeipei
     * @since 3.2.0
     */
    public Boolean getRecomSafe() {
    	return (totalLabels & DOCTOR_LABEL_RECOM_SAFE) == DOCTOR_LABEL_RECOM_SAFE;
    }

    /**
     * 是否强制ICD10诊断医生
     * @author zhoupeipei
     * @since 3.5.0
     * @return
     */
    public Boolean getDiagnosis() {
    	return (totalLabels & DOCTOR_LABEL_DIAGNOSIS) == DOCTOR_LABEL_DIAGNOSIS;
    }
}
